package com.aabte.auth.account.domain.repository;

import com.aabte.auth.account.domain.model.Account;
import com.aabte.auth.account.domain.model.AccountId;
import com.aabte.auth.account.domain.model.AccountName;
import com.aabte.auth.account.domain.model.Password;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.Optional;

public interface AccountRepository {

    Optional<Account> find(AccountId accountId);

    Optional<Account> find(AccountName accountName);

    Optional<Account> find(AccountName accountName, Password password);

    Page<Account> find(Pageable pageable);

    AccountId nextAccountId();

    void addOrUpdate(Account account);
}
